home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / ISTAR.CMD < prev    next >
Encoding:
Text File  |  1996-03-01  |  1.9 KB  |  106 lines

  1. #    Login.cmd for NSTN/iStar Communications
  2. #
  3. #
  4. echo on
  5. trace off
  6. load $username
  7. load $number
  8. load $init
  9. $inline = "nothing"
  10. %TIMEOUT = 0
  11. $RESULT = 0
  12.  
  13. display Status: Commencing Login Procedure\n
  14.  
  15. if %ppp = 0
  16.    $type = "SLIP"
  17. else
  18.    $type = "PPP"
  19. end
  20.  
  21. #display Status: Hanging up Modem\n
  22. sleep 2
  23. output +++
  24. sleep 2
  25. display "Status: Initializing Modem"
  26. output ATH0\r
  27. if [input 10 OK] = 0
  28.  abort
  29. end
  30. display "..."
  31. output ATE1Q0V1\r
  32. if [input 10 OK] = 0
  33.  abort
  34. end
  35. display "..."\n
  36. output AT$init\r
  37. if [input 10 OK] = 0
  38.  abort
  39. end
  40. display Status: Dialling...\n
  41. $RESULT = "RINGING"
  42.  
  43. %ATTEMPTS = 0
  44. %connect = 0
  45. repeat
  46.    %doneloop = 0
  47.    %ATTEMPTS = %ATTEMPTS + 1
  48.    OUTPUTECHO 60 AT$NUMBER\r
  49.    repeat
  50.       %TIMEOUT = [ READ 30 $RESULT ]
  51.       $myres = copy($RESULT,1,4)
  52.       if $myres = "CONN"
  53.          %doneloop = 1
  54.          %connect = 1
  55.       end
  56.       if $myres = "NO C"
  57.          %doneloop = 1
  58.          %connect = 0
  59.       end
  60.       if $myres = "BUSY"
  61.          %doneloop = 1
  62.          %connect = 0
  63.       end
  64.       if $myres = "RING"
  65.          %doneloop = 0
  66.          %conne
  67. ct = 0
  68.       end
  69.       if $myres = "NO D"
  70.          %doneloop = 1
  71.          %connect = 0
  72.       end
  73. #   display got $RESULT with %doneloop %connect\n
  74.    until %doneloop = 1
  75.    sleep 2
  76. UNTIL %connect = 1
  77.  
  78. display "Status: Connecting"
  79. repeat # keep prodding server till it wakes up
  80.  output \r
  81.  display "... "
  82. until [input 5 name:]
  83. display \n
  84.  
  85. repeat # get a good username/password
  86.  username Please enter your username
  87.  output \u\r
  88.  input 30 word:
  89.  password Please enter your password
  90.  output \p\r
  91. until [input 5 name:] = 0
  92.  
  93. if $type = "SLIP"
  94.  output slip default\n
  95.  input 30 Your 
  96.  address 30
  97.  input 30 \n
  98.  display \n
  99.  display Status: Starting SLIP. Your IP address is \i.\n
  100. else
  101.  display Status: Starting PPP.\n
  102.  output ppp default\n
  103. end
  104.  
  105. display  YOU ARE NOW CONNECTED. PLEASE MINIMIZE THIS WINDOW TO CONTINUE.\n
  106.